Skip to content

Update: make dense dependency diagnostics debug-only - #1448

Merged
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
Little-oil:perf/remove-dense-dependency-warning
Jul 23, 2026
Merged

Update: make dense dependency diagnostics debug-only#1448
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
Little-oil:perf/remove-dense-dependency-warning

Conversation

@Little-oil

@Little-oil Little-oil commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Emit dense fanin and fanout diagnostics at DEBUG instead of WARN on a2a3 and a5.
  • Preserve the threshold and once-per-dense-task behavior.
  • Exercise fanin and fanout degrees above the threshold in dummy-task scenes.

Testing

  • pip install --no-build-isolation -e .
  • a2a3sim dummy-task scene: 1 passed
  • a5sim dummy-task scene: 1 passed
  • Default V5/INFO run emits no dense dependency messages
  • DEBUG run emits exactly one fanout and one fanin message
  • Onboard a2a3 deterministic sequence: paged_attention then ScalarData, 2 passed
  • Rebased onto main with the ScalarData undefined-output fix from Fix: scalar_data_test check tensor reads uninitialized device slot #1449
  • PR CI rerun for rebased head

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b49c327f-c50d-4b56-a010-d14d6fca3f2a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The dependency-degree threshold was renamed for debug logging, and dense fanout/fanin diagnostics in both runtime variants now emit at debug level. Dummy-task documentation was updated to describe the four-scene orchestration and case-4 dependency pattern.

Changes

Dependency diagnostics

Layer / File(s) Summary
Debug threshold and runtime diagnostics
src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_*.{h,cpp}, src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_*.{h,cpp}
The threshold remains 16 under PTO2_DEP_DEGREE_DEBUG_THRESHOLD; dense fanout and fanin diagnostics now use LOG_DEBUG.
Dense dependency scenario documentation
tests/st/a2a3/.../dummy_task/*, tests/st/a5/.../dummy_task/*
Documentation now describes four orchestration scenes and case 4’s 18-barrier fanout/fanin scenario.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

“Hop!” said the rabbit, “warnings now sleep,
Debug logs watch the barriers leap.
Sixteen marks the path so bright,
Eighteen hops make fanin light.
Four scenes bloom in the test-run sun—
Clean dependency trails for everyone!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly states the main change: dense dependency diagnostics are now debug-only.
Description check ✅ Passed The description matches the changes by describing the WARN-to-DEBUG shift, preserved threshold behavior, and added high-degree test coverage.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py (1)

98-100: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

The mirrored dense tests do not verify the diagnostic contract.

  • tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py#L98-L100: assert INFO produces no dense messages and DEBUG produces exactly one fanout and one fanin message.
  • tests/st/a5/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py#L94-L96: add the same diagnostic assertions or reference shared log-validation coverage.

Based on PR objectives, diagnostic level and exactly-once behavior are explicit acceptance criteria.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py` around
lines 98 - 100, Add diagnostic assertions to the dense-dependency tests in
tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py:98-100 and
tests/st/a5/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py:94-96,
verifying INFO emits no dense messages while DEBUG emits exactly one fanout and
one fanin message; alternatively, reuse shared log-validation coverage in both
sites.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py`:
- Around line 98-100: Add diagnostic assertions to the dense-dependency tests in
tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py:98-100 and
tests/st/a5/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py:94-96,
verifying INFO emits no dense messages while DEBUG emits exactly one fanout and
one fanin message; alternatively, reuse shared log-validation coverage in both
sites.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7e448581-70dc-46e3-bd54-9d190d1e5e0f

📥 Commits

Reviewing files that changed from the base of the PR and between 717d703 and b3fdbb2.

📒 Files selected for processing (8)
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_orchestrator.cpp
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_runtime2_types.h
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_orchestrator.cpp
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_runtime2_types.h
  • tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/kernels/orchestration/dummy_task_orch.cpp
  • tests/st/a2a3/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py
  • tests/st/a5/tensormap_and_ringbuffer/dummy_task/kernels/orchestration/dummy_task_orch.cpp
  • tests/st/a5/tensormap_and_ringbuffer/dummy_task/test_dummy_task.py

@Little-oil
Little-oil force-pushed the perf/remove-dense-dependency-warning branch 5 times, most recently from f29d052 to 017f66e Compare July 23, 2026 03:35
- Keep fanin and fanout threshold checks but emit them at DEBUG level for both a2a3 and a5 runtimes.
- Exercise high-degree fanin and fanout wiring in dummy-task scenes.

This keeps the diagnostic available on demand without adding noise to normal runtime logs.
@ChaoZheng109
ChaoZheng109 merged commit c032e07 into hw-native-sys:main Jul 23, 2026
18 of 31 checks passed
@Little-oil
Little-oil deleted the perf/remove-dense-dependency-warning branch July 23, 2026 06:35
ChaoZheng109 added a commit to ChaoZheng109/simpler that referenced this pull request Jul 23, 2026
…DEBUG)

Post-merge follow-up: upstream hw-native-sys#1448 kept the print_stats 'Ring %d' /
'last_task_alive' lines at LOG_INFO_V0 while removing the dep_pool detail.
Per this branch's original plan (commit demoting print_stats/print_queues
to DEBUG), demote those two upstream-kept lines to LOG_DEBUG. Upstream's
deletions (dep_pool / FaninPool dense diagnostics) stay deleted; nothing new
is added.

Reviewed:
  src/a2a3/runtime/host_build_graph/runtime/scheduler/pto_scheduler.cpp
ChaoZheng109 added a commit to ChaoZheng109/simpler that referenced this pull request Jul 23, 2026
Trim low-signal LOG_* call sites across the runtime and platform layers,
keeping the diagnostics that trace program flow or failures:

- Flow / lifecycle / summary logs kept at INFO; per-item (per-tensor,
  per-arg) detail demoted to LOG_DEBUG; failure paths stay LOG_ERROR /
  LOG_WARN. Loader / device-runner load-path diagnostics kept at their
  original levels.
- AICPU hot paths (per-task / per-scope dispatch loops) carry no logs
  (codestyle rule 7); DFX collectors keep their buffer-level init/flush
  diagnostics and telemetry counters.
- STRACE, LOG_RUNTIME_FAILURE and ACL logging left untouched.
- Log-only support removed with its logs (bookkeeping counters, dump
  scaffolding); genuine out-of-scope strip collateral restored
  (unused-parameter removals, blank-line deletions).

Rebased onto upstream/main; dense dependency diagnostics follow upstream's
debug-only / removed decisions (hw-native-sys#1448), completion follows the polling
mechanism (hw-native-sys#1435).
ChaoZheng109 added a commit to ChaoZheng109/simpler that referenced this pull request Jul 27, 2026
Trim low-signal LOG_* call sites across the runtime and platform layers,
keeping the diagnostics that trace program flow or failures:

- Flow / lifecycle / summary logs kept at INFO; per-item (per-tensor,
  per-arg) detail demoted to LOG_DEBUG; failure paths stay LOG_ERROR /
  LOG_WARN. Loader / device-runner load-path diagnostics kept at their
  original levels.
- AICPU hot paths (per-task / per-scope dispatch loops) carry no logs
  (codestyle rule 7); DFX collectors keep their buffer-level init/flush
  diagnostics and telemetry counters.
- STRACE, LOG_RUNTIME_FAILURE and ACL logging left untouched.
- Log-only support removed with its logs (bookkeeping counters, dump
  scaffolding); genuine out-of-scope strip collateral restored
  (unused-parameter removals, blank-line deletions).

Rebased onto upstream/main; dense dependency diagnostics follow upstream's
debug-only / removed decisions (hw-native-sys#1448), completion follows the polling
mechanism (hw-native-sys#1435).

Co-Authored-By: vegetabledoww <114059112+vegetabledoww@users.noreply.github.com>
ChaoZheng109 added a commit to ChaoZheng109/simpler that referenced this pull request Jul 27, 2026
Trim low-signal LOG_* call sites across the runtime and platform layers,
keeping the diagnostics that trace program flow or failures:

- Flow / lifecycle / summary logs kept at INFO; per-item (per-tensor,
  per-arg) detail demoted to LOG_DEBUG; failure paths stay LOG_ERROR /
  LOG_WARN. Loader / device-runner load-path diagnostics kept at their
  original levels.
- AICPU hot paths (per-task / per-scope dispatch loops) carry no logs
  (codestyle rule 7); DFX collectors keep their buffer-level init/flush
  diagnostics and telemetry counters.
- STRACE, LOG_RUNTIME_FAILURE and ACL logging left untouched.
- Log-only support removed with its logs (bookkeeping counters, dump
  scaffolding); genuine out-of-scope strip collateral restored
  (unused-parameter removals, blank-line deletions).

Rebased onto upstream/main; dense dependency diagnostics follow upstream's
debug-only / removed decisions (hw-native-sys#1448), completion follows the polling
mechanism (hw-native-sys#1435).

Co-Authored-By: vegetabledoww <114059112+vegetabledoww@users.noreply.github.com>
ChaoZheng109 added a commit that referenced this pull request Jul 27, 2026
Trim low-signal LOG_* call sites across the runtime and platform layers,
keeping the diagnostics that trace program flow or failures:

- Flow / lifecycle / summary logs kept at INFO; per-item (per-tensor,
  per-arg) detail demoted to LOG_DEBUG; failure paths stay LOG_ERROR /
  LOG_WARN. Loader / device-runner load-path diagnostics kept at their
  original levels.
- AICPU hot paths (per-task / per-scope dispatch loops) carry no logs
  (codestyle rule 7); DFX collectors keep their buffer-level init/flush
  diagnostics and telemetry counters.
- STRACE, LOG_RUNTIME_FAILURE and ACL logging left untouched.
- Log-only support removed with its logs (bookkeeping counters, dump
  scaffolding); genuine out-of-scope strip collateral restored
  (unused-parameter removals, blank-line deletions).

Rebased onto upstream/main; dense dependency diagnostics follow upstream's
debug-only / removed decisions (#1448), completion follows the polling
mechanism (#1435).

Co-authored-by: vegetabledoww <114059112+vegetabledoww@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants